package com.gree.changying.server.utils;

import com.gree.changying.server.response.Respone;
import com.gree.changying.server.utils.json.JsonMananger;

/**
 * Create by 游德禄 on 2020-4-3
 */
public class ErrMsgUtil {
    public static String getMsg(int statusCode, String msg){
        Respone respone = getMsgRespone(statusCode,msg);
        try {
            return JsonMananger.beanToJson(respone);
        }catch (Exception e){

        }
        return null;
    }
    public static Respone getMsgRespone(int statusCode, String msg){
        Respone respone = new Respone();
        respone.setStatusCode(statusCode);
        respone.setMessage(msg);
        return respone;
    }
}
